﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Telerik.Windows.Controls;

namespace DiagnosticCenter.View
{
    public partial class viewTesting : Page
    {
        public viewTesting()
        {
            InitializeComponent();
        }

        // Executes when the user navigates to this page.
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            tabTest.MouseLeftButtonUp += tabClick_MouseLeftButtonUp;
            tabResult.MouseLeftButtonUp += tabClick_MouseLeftButtonUp;
        }

        private void tabClick_MouseLeftButtonUp(object sender, RoutedEventArgs e)
        {
            var tabItem = (RadTabItem)sender;
            switch (tabItem.Name)
            {
                case "tabTest": frameTesting.Navigate(new Uri("/View/viewTestingTest.xaml", UriKind.Relative)); break;
                case "tabResult": frameTesting.Navigate(new Uri("/View/viewTestingResult.xaml", UriKind.Relative)); break;
            }
        }
                 
    }
}
